﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Aribaccio.Device.Modbus
{
    public class DeviceDataModbus<T> : DeviceData<T> where T : IDevice<IDevicePara>
    {
        /// <summary>
        /// 16进制字符串
        /// </summary>
        public string DataHexString { get; set; }

        /// <summary>
        /// 设备Modbus数据
        /// </summary>
        public ModbusSlaveData<StructInputShort> DataModbus { get; set; }

        /// <summary>
        /// 带参构造函数
        /// </summary>
        /// <param name="argChannel">通道接口对象</param>
        public DeviceDataModbus(T argChannel, string argDataHex, ModbusSlaveData<StructInputShort> argDataModbus)
            : base(argChannel)
        {
            this.DataHexString = argDataHex;
            this.DataModbus = argDataModbus;
        }
    }
}
